<template>
  <div class="app">
    <h1 v-text="wel" ref="title"></h1>
    <button @click = "showDom" ref="btn">click</button>
    <SchoolInfo ref="sch"/>
    <SchoolInfo/>
    <SchoolInfo/>
  </div>
</template>


<script>
//汇总引入组件
import SchoolInfo from "@/components/SchoolInfo.vue";
export default {
  name:'App',
  data(){
    return {
      wel:'Welcome Vue!'
    }
  },
  methods:{
    showDom(){
      console.log(this.$refs.title)
      console.log(this.$refs.btn)
      console.log(this.$refs.sch)
    }
  },
  components:{
    SchoolInfo
  }
}

</script>
<style>
.app{
  height: 600px;
  background-color: cadetblue;
}


</style>
